package erfgame.core.world.terrain.async;

import java.util.concurrent.Executor;


import erfgame.core.dao.ObjectDAO;
import erfgame.core.memory.Pointer;

public class AsyncPointerDAOProxy<KeyType, ObjectType> extends
		AsyncObjectDAOProxy<KeyType, Pointer<ObjectType>> {
	
	public AsyncPointerDAOProxy(
			Executor executor, 
			ObjectDAO<KeyType, Pointer<ObjectType>> proxied, 
			ObjectDAO<KeyType, Pointer<ObjectType>> waitingObjects		
	) {
		super(executor, proxied, waitingObjects);
	}

	@Override
	protected Pointer<ObjectType> claim(Pointer<ObjectType> o) {
		return o.assign();
	}

	@Override
	protected void free(Pointer<ObjectType> o) {
		o.free();
	}

	
}
